--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Commit 6053063720ad76df852d4ebda939070e4dd1cdff
Parents : 75f927d
Author : Antonio Galea <antonio.galea@gmail.com>
Date : 2026-01-27T16:03:23+01:00
Trap and log errors when loading plugins
Changes
Diff
diff --git a/sbapp/sideband/core.py b/sbapp/sideband/core.py
index fe8bcbfd..0e6c9581 100644
--- a/sbapp/sideband/core.py
+++ b/sbapp/sideband/core.py
@@ -849,7 +849,11 @@ class SidebandCore():
plugin_globals["SidebandTelemetryPlugin"] = SidebandTelemetryPlugin
RNS.log("Loading plugin \""+str(file)+"\"", RNS.LOG_NOTICE)
plugin_path = os.path.join(plugins_path, file)
- exec(open(plugin_path).read(), plugin_globals)
+ try:
+ exec(open(plugin_path).read(), plugin_globals)
+ except Exception as e:
+ RNS.log("Error loading plugin \""+str(file)+"\": "+str(e), RNS.LOG_ERROR)
+ continue
plugin_class = plugin_globals["plugin_class"]
if plugin_class != None:
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────